home *** CD-ROM | disk | FTP | other *** search
- ATsis -- Creating stereograms with the Atari ST/TT/Falcon
- ===========================================================
-
- (C) Copyright 2/1995 Christian Perle <incp@sun.rz.tu-clausthal.de>
-
- (Original SIRDS routine by W.A. Steer)
-
-
- INTRO
- -----
- The first time I ever heard of SIRDS (Single Image Random Dot Stereograms),
- I thought "This is bulls**t, no-one can see them". A friend of mine gave me
- a black/white print and what I saw was random pixels all over the paper.
- "You have to look _behind_ the picture to see the image", he said, but I
- still couldn't see it.
-
- A few months later I was clicking around in WWW and found some SIRDS pages.
- "Oh no, not again", I thought, and just for fun I looked at a very chaotic
- picture. Then I saw it. The 3-D object literally jumped me in the eye.
- "These things are getting interesting", I thought and immediately searched
- a few ftp archives for SIRDS maker programs. There were many of them for
- DOS, a few for Amiga and Unix, and not a single one for Atari.
-
- Fortunately, I found a SIRDS FAQ on internet, with an excellent C++ source
- for making high quality SIRDS. I ported the program to GNU C and added file
- handling which was not present in the original code.
-
-
- WHAT IS SIRDS/SIS?
- ------------------
- SIRDS is a method to encode depth information in a single image. A random
- pattern is repeated over each line of the image. When the image is watched
- "parallel", so that the left eye focuses on a different point than the
- right eye, shifts in the pattern can create different depths. The distance
- between the left/right focus point should be exactly the pattern width. In
- order to see the depth more easily, I have added two "help marks" showing
- this width at the top of the image. Shift them until you see three marks.
- On more information how to see SIRDS, read the SIRDS FAQ.
-
- SIS is basically the same as SIRDS, but the pattern is not random. There
- must be a picture file which is tiled across the image to create the
- pattern.
-
-
- FILES
- -----
- ATSIRDS.C Source (GNU C) for ATsirds
- ATSIS.C Source (GNU C) for ATsis
- ATSIRDS.TTP ATsirds program, writes PBM output file
- ATSIS.TTP ATsis program, writes PPM output file
- AGATTILE.POV POV-Ray scene for tile picture
- BOZOTILE.POV POV-Ray scene for tile picture
- CARTILE.POV POV-Ray scene for tile picture
- DEPTH1.POV POV-Ray scene for depth data
- DEPTH2.POV POV-Ray scene for depth data
- DEPTH3.POV POV-Ray scene for depth data
- DEPTH4.POV POV-Ray scene for depth data
- DEPTH5.POV POV-Ray scene for depth data
- DEPTH6.POV POV-Ray scene for depth data
- DEPTH7.POV POV-Ray scene for depth data
- MARBTILE.POV POV-Ray scene for tile picture
- OBJETILE.POV POV-Ray scene for tile picture
- STONTILE.POV POV-Ray scene for tile picture
- DEPTH1.RED POV-created depth data for SIRDS/SIS
- DEPTH2.RED POV-created depth data for SIRDS/SIS
- DEPTH3.RED POV-created depth data for SIRDS/SIS
- STONTILE.TGA POV-created tile picture for SIS
- ATSIS.TXT this file
-
-
- GENERATING SIRDS
- ----------------
- ATsirds reads depth data from a raw file (more on this file type later).
- Output goes to a PBM (portable bitmap) file 'SIRDS.PBM'. The size of the
- depth data must be 640x470 pixels.
-
- To render the SIRDS, just start a command line shell and say
-
- atsirds <depthfile>
-
- where <depthfile> is the raw depth data filename.
-
- GENERATING SIS
- --------------
- ATsis is used for the SIS type of stereograms. Depth data is read from a
- raw file and the tile picture is read from an uncompressed 24-bit TGA file.
- Tile size must be 96x470 pixels.
-
- Using the right tile pictures creates the most beautiful looking
- stereograms, far better than random dots. ATsis also uses a special
- oversampling technique for smooth object surfaces. The PPM (portable
- pixmap) output 'SIS.PPM' of ATsis looks best in true color or dithered to
- 256 colors. I recommend GEM-View or PBMplus for post processing.
-
- To render the SIS, just start a command line shell and say
-
- atsis <depthfile> <tilefile>
-
- where <depthfile> is the raw depth data filename and <tilefile> is the TGA
- tile filename.
-
-
- DEPTH FILE FORMAT
- -----------------
- A depth file is just headerless raw data, one byte per pixel. The byte
- value (0..255) describes the distance from the observer. A lower value is
- far away (background), a higher value is closer to the observer. Depth
- files are read line by line from left to right.
-
-
- USING POV-RAY TO CREATE DEPTH DATA
- ----------------------------------
- Most of the input data for SIRDS is created by 3-D rendering programs.
- ATsirds/sis is suited for using the output of POV-Ray, a superb free
- raytracer. Both depth data and tile pictures can be created with POV-Ray.
-
- To render depth data with POV-Ray, use the parameters:
-
- povray +iDEPTH5.POV +oDEPTH5 +w640 +h470 +fr
- ^^^
- raw format, important!
-
- This will create three files: DEPTH5.RED, DEPTH5.GRN and DEPTH5.BLU.
- Because the image is greyscale, files DEPTH5.GRN and DEPTH5.BLU can be
- removed (red, green and blue parts contain the same information). Use
- DEPTH5.RED with ATsirds/sis.
-
- For those who are familiar with POV-Ray:
- All objects in the scene are ambient lighted. There is no light source. The
- camera looks straight into Z direction. The objects must be placed in a
- white/black gradient texture in front of the camera. If an object is placed
- closer to the camera, it gets brighter. If it is placed far, it gets
- darker. The problem is to fit all objects into one white/black range
- (remember the gradient repeats). In scene DEPTH5.POV, there are two camera
- declarations: One for normal view and depth data output, and one from the
- side for checking if the objects are placed right.
-
-
- USING POV-RAY TO CREATE TILE PICTURES
- -------------------------------------
- To render a tile picture with POV-Ray, use the parameters:
-
- povray +iAGATTILE.POV +oAGATTILE.TGA +w96 +h470 +ft
-
-
-
- --
- That's it.
- Have fun with ATsis!
-